/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.qp.smsmarketing.entity;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 *
 * @author waldenilson
 */
@Entity
@Table(name = "operacao")
public class Operacao implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)

    
    @Basic(optional = false)
    @Column(name = "id_operacao")
    private Integer idOperacao;
    @Column(name = "nome_operacao")
    private String nomeOperacao;
    @Column(name = "desc_operacao")
    private String descOperacao;
    @OneToMany(mappedBy = "operacaoOperacaoUsuario")
    private List<OperacaoUsuario> operacaoOperacaoUsuarioList;

    public Operacao() {
    }


    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idOperacao != null ? idOperacao.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Operacao)) {
            return false;
        }
        Operacao other = (Operacao) object;
        if ((this.idOperacao == null && other.idOperacao != null) ||
                (this.idOperacao != null && !this.idOperacao.equals(other.idOperacao))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.qp.smsmarketing.entity.TipoMsg[ idTipoMsg=" + idOperacao + " ]";
    }

    /**
     * @return the idOperacao
     */
    public Integer getIdOperacao() {
        return idOperacao;
    }

    /**
     * @param idOperacao the idOperacao to set
     */
    public void setIdOperacao(Integer idOperacao) {
        this.idOperacao = idOperacao;
    }

    /**
     * @return the nomeOperacao
     */
    public String getNomeOperacao() {
        return nomeOperacao;
    }

    /**
     * @param nomeOperacao the nomeOperacao to set
     */
    public void setNomeOperacao(String nomeOperacao) {
        this.nomeOperacao = nomeOperacao;
    }

    /**
     * @return the descOperacao
     */
    public String getDescOperacao() {
        return descOperacao;
    }

    /**
     * @param descOperacao the descOperacao to set
     */
    public void setDescOperacao(String descOperacao) {
        this.descOperacao = descOperacao;
    }

    /**
     * @return the operacaoOperacaoUsuarioList
     */
    public List<OperacaoUsuario> getOperacaoOperacaoUsuarioList() {
        return operacaoOperacaoUsuarioList;
    }

    /**
     * @param operacaoOperacaoUsuarioList the operacaoOperacaoUsuarioList to set
     */
    public void setOperacaoOperacaoUsuarioList(List<OperacaoUsuario> operacaoOperacaoUsuarioList) {
        this.operacaoOperacaoUsuarioList = operacaoOperacaoUsuarioList;
    }
    
}
